import 'package:FiduMart/generated/json/base/json_convert_content.dart';
import 'package:FiduMart/core/network/model/invite_num_entity.dart';

InviteNumEntity $InviteNumEntityFromJson(Map<String, dynamic> json) {
  final InviteNumEntity inviteNumEntity = InviteNumEntity();
  final String? userCount = jsonConvert.convert<String>(json['userCount']);
  if (userCount != null) {
    inviteNumEntity.userCount = userCount;
  }
  final String? inviteIncome = jsonConvert.convert<String>(
      json['inviteIncome']);
  if (inviteIncome != null) {
    inviteNumEntity.inviteIncome = inviteIncome;
  }
  final String? inviteCount = jsonConvert.convert<String>(json['inviteCount']);
  if (inviteCount != null) {
    inviteNumEntity.inviteCount = inviteCount;
  }
  return inviteNumEntity;
}

Map<String, dynamic> $InviteNumEntityToJson(InviteNumEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['userCount'] = entity.userCount;
  data['inviteIncome'] = entity.inviteIncome;
  data['inviteCount'] = entity.inviteCount;
  return data;
}

extension InviteNumEntityExt on InviteNumEntity {
  InviteNumEntity copyWith({
    String? userCount,
    String? inviteIncome,
    String? inviteCount,
  }) {
    return InviteNumEntity()
      ..userCount = userCount ?? this.userCount
      ..inviteIncome = inviteIncome ?? this.inviteIncome
      ..inviteCount = inviteCount ?? this.inviteCount;
  }
}